<template>
  <div>
    <Xgplayer :config="config" @player="Player = $event" />
  </div>
</template>

<script>
import Xgplayer from 'xgplayer-vue'
export default {
  components: {
    Xgplayer,
  },
  props: ['url'],
  data() {
    return {
      // 播放器配置
      config: {
        id: 'vs',
        url: this.url,
        // height: '20vh',
        // 'border-radius': '5px',
        fluid: true,
        videoInit: true,
        closeVideoClick: true,
        // 阻止默认事件
        closeVideoPreventDefault: true,
        fluid: true,
      },
      Player: null,
    }
  },
}
</script>

<style lang="scss" scoped></style>
